package com.qianzhou.eduCommon.utils;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qianzhou.eduCommon.vo.PageInfoVO;

public class PageInfoQuery<T> {
    public PageInfoVO<T> getPageInfoData(IPage<T> page) {
        PageInfoVO<T> pageInfoVO = new PageInfoVO<T>();
        pageInfoVO.setPageNum(page.getCurrent());
        pageInfoVO.setPageSize(page.getSize());
        pageInfoVO.setTotal(page.getTotal());
        pageInfoVO.setData(page.getRecords());
        return pageInfoVO;
    }
}
